﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace EventYard.Services.Models
{
    [DataContract]
    public class EventModel
    {
        [DataMember(Name = "id")]
        public int Id { get; set; }

        [DataMember(Name = "title")]
        public string Title { get; set; }
        [DataMember(Name = "notes")]
        public string Notes { get; set; }
        [DataMember(Name = "place")]
        public string Place { get; set; }
        [DataMember(Name = "time")]
        public DateTime Time { get; set; }

        [DataMember(Name = "invitedNUsers")]
        public IEnumerable<string> NotRegistredUsers { get; set; }
        [DataMember(Name = "invitedUsers")]
        public IEnumerable<EventUserModel> RegistredUsers { get; set; }

        public EventModel()
        {
            this.NotRegistredUsers = new HashSet<string>();
            this.RegistredUsers = new HashSet<EventUserModel>();
        }
    }
}

//{
//    title: "this is title",
//    notes: "nodes here",
//    place: "place here",
//    invitedNUsers: ["ivan", "pesho"],
//    invitedUsers: [{id: "2"}]
//}